<?php
class Mageex_RelatedProduct_Block_Adminhtml_RelatedProduct_Type extends Mage_Adminhtml_Block_Widget
{
    /**
     * Edit Block model
     *
     * @var bool
     */
    protected $_editMode = false;

    /**
     * Retrieve template object
     *
     * @return Mage_Newsletter_Model_Template
     */
    public function getModel()
    {
        return Mage::registry('_current_template');
    }

    /**
     * Preparing block layout
     *
     * @return Mage_Adminhtml_Block_Newsletter_Template_Edit
     */
    protected function _prepareLayout()
    {
        // Load Wysiwyg on demand and Prepare layout
        if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled() && ($block = $this->getLayout()->getBlock('head'))) {
            $block->setCanLoadTinyMce(true);
        }

        $this->setChild('back_button',
            $this->getLayout()->createBlock('adminhtml/widget_button')
                ->setData(array(
                    'label'     => Mage::helper('newsletter')->__('Back'),
                    'onclick'   => "window.location.href = '" . $this->getUrl('*/*') . "'",
                    'class'     => 'back'
                ))
        );

        return parent::_prepareLayout();
    }
	public function getBackButtonHtml()
    {
        return $this->getChildHtml('back_button');
    }
    /**
     * Return header text for form
     *
     * @return string
     */
    public function getHeaderText()
    {
        return  Mage::helper('relatedproduct')->__('Select block type');
    }

    /**
     * Return form block HTML
     *
     * @return string
     */
    public function getForm()
    {
        return $this->getLayout()
            ->createBlock('relatedproduct/adminhtml_relatedproduct_edit_formtype')
            ->toHtml();
    }

    /**
     * Return action url for form
     *
     * @return string
     */
    public function getContinueUrl()
    {
        return $this->getUrl('*/*/type');
    }

  
}
